package com.example.sequences.result;

import java.util.HashMap;
import java.util.List;

/**
 * Result
 *
 * @author maxsc
 * @title Result.java
 * @date 2018/5/10
 */
public class Result extends HashMap<String,Object> {
    public static Result instance(){
        return new Result();
    }
    public Result addAttr(String key,Object value) {
        this.put(key,value);
        return this;
    }
    public Result success(){
        return this.Code(ResultConsts.CODE_SUCCESS);
    }
    public Result Code(int code){
        this.put(ResultConsts.CODE,code);
        return this;
    }
}
